<?php

session_start();

$con = mysql_connect("127.0.0.1","root","");
  
if (!$con) {
	die('Could not connect: ' . mysql_error());
}

mysql_select_db("guilde_banke", $con);



?>
<!DOCTYPE html> 
<html> 
	<head> 
	<title>Ye Olde Guilde Banke</title> 
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
	<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
	<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script>
	<style type="text/css">
.icon { width: 80px; }

</style>
</head> 
<body> 

<div data-role="page"  data-theme="a" >

	<div data-role="header">
	<h1>Ye Olde Guilde Bank</h1>
	<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
			
	</div><!-- /header -->



	
	<div data-role="content">
	<?php 
	foreach ($_GET as $key => $value) {
		if ($key != "submit") {
			$query = "SELECT * FROM bank_items WHERE id='".$key."'";
			echo $query;
			$result = mysql_query($query);
			$row = mysql_fetch_array($result);
			?>
			<div data-role="fieldcontain" >
			<div class="ui-grid-b">
			<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px"></div></div>
			<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px"><div align="right"><input style="text-align: right" type="text" name="<?php echo $key;?>" id="<?php echo $key;?>" value="1"  /></div></div></div>
			<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px"><label for="<?php echo $key;?>"><?php echo "<a href=\"http://old.wowhead.com/item=".$row['itemID']."\"><font color=\"".$row['itemColor']."\">";
			echo $row['itemStr']."</font></a>";
			?></label>
	         
			</div></div></div>
		</div><!-- /grid-c -->
			
			
	         
			<?php
	
  


		echo "Key: $key; Value: $value<br />\n";
		}
	}



	?>
		
		<form action="form.php" method="post"> 
		<div class="ui-grid-a">
	<div class="ui-block-a"> <a href="index.php" data-role="button" data-icon="home" data-theme="c">Cancel</a></div>
	<div class="ui-block-b"><button type="submit"  data-rel="dialog" data-theme="b" name="submit" value="submit-value">Checkout</button></div>
</div><!-- /grid-a -->
		
  
		</form>
	</div><!-- /content -->
<div data-role="footer"  data-id="foo1" data-position="fixed">		
	<div data-role="navbar">
		<ul>
			<li><a href="#">Clear</a></li>
			<li><a href="users.php">Users</a></li>
			<li><a href="#">Checkout</a></li>
		</ul>
	</div><!-- /navbar -->
</div><!-- /footer -->

</div><!-- /page -->

</body>
</html>

<?php
mysql_close($con);
?>